<?php

namespace App\Http\Requests\Admin\Shop\Option;

use App\Http\Requests\Admin\Request;

class UpdateRequest extends Request
{

    public function rules()
    {
         
        return [
            'name' => 'required',
            //'url'=>array('regex:/(http?|ftp?):\/\/(www)\.([^\.\/]+)\.(com|cn)(\/[\w-\.\/\?\%\&\=]*)?/i')
            'code'=> 'required'
        ];
    }

    public function messages()
    {
        return [
            'name.required' => '名称必须填写',
            'name.max' => '名称最长为5个字符',
            'name.unique' => '名称已存在',
            'code.required'=>"期权编码必须填写"
        ];
    }
}
